Date.prototype.toAppDate = function () {
    return this.toLocaleDateString().replace(/\//g, '-');
};

Date.prototype.toAppTime = function (m) {
    const date = this.toLocaleDateString().replace(/\//g, '-');
    const hours = this.getHours();
    const minutes = this.getMinutes();
    const seconds = this.getSeconds();
    if(m){
        return `${date} ${hours}:${minutes}`;
    }else{
        return `${date} ${hours}:${minutes}:${seconds}`;
    }

};